package cn.itcast.nems.studentrecord.dto.odto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 班级信息
 */
@Data
public class ClassInfoDTO {
    /* 班级id */
    private Integer classinfoId;
    /* 班级名字 */
    private String className;
    // 待定班
    private Boolean pending;
    // 班级已删除
    private Boolean deleted;
    // 班级是否为基础班
    private Boolean basic;
    // 开班日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate startDate;
    // 结课日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate endDate;
    // 预计结课日期
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate preEndDate;
    // 报名时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime signupDateTime;
    // 班级类型Code
    private String classTypeCode;
    // 班级类型名称
    private String classTypeName;
    // 授课模式code
    private String teachModeCode;
    // 授课模式名称
    private String teachModeName;
    // 授课模式code
    private String schoolCode;
    // 授课模式名称
    private String schoolName;
    //学籍状态:NEWSTUDENT,RESTUDY,RETURNSCHOOL,SUSPENDRETURN,THEFRESHMAN,TRANSITION,UPGRADE,DOWNGRADE,EXPULSION,LEAVESCHOOL,SUSPEND,TRANSITIONOUT
    private String nature;
    // 学员在该班是否为有效学员
    private boolean valid;
    /**
     * 学科归属类名称
     */
    private String subjectAccountName;
    /**
     * 学科归属类code
     */
    private String subjectAccountCode;
}
